.class Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;
.super Ljava/lang/Object;
.source "MediaControlPanelEditMode.java"

# interfaces
.implements Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/view/MediaControlPanelEditMode;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V
    .locals 0
    .parameter

    .prologue
    .line 187
    iput-object p1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onCheckedChanged(Lcom/htc/android/footprints/commonui/SwitchButton;Z)V
    .locals 6
    .parameter "switchbutton"
    .parameter "flag"

    .prologue
    const/4 v1, 0x0

    .line 188
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-nez v0, :cond_0

    .line 189
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    .line 206
    :goto_0
    return-void

    .line 192
    :cond_0
    invoke-static {}, Lcom/htc/android/footprints/utils/StorageUtil;->isExternalStorageEnough()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-static {}, Lcom/htc/android/footprints/utils/StorageUtil;->isInternalStorageEnough()Z

    move-result v0

    if-nez v0, :cond_2

    .line 193
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    .line 194
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    invoke-virtual {v0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object v0

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    invoke-virtual {v1}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0a005f

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/htc/android/footprints/utils/FootprintUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0

    .line 198
    :cond_2
    if-eqz p2, :cond_3

    .line 199
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    #calls: Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->calRecordingTime()V
    invoke-static {v0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->access$300(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    .line 200
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J
    invoke-static {v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->access$400(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)J

    move-result-wide v2

    const-wide/16 v4, 0x3e8

    mul-long/2addr v2, v4

    #calls: Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;
    invoke-static {v1, v2, v3}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->access$500(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 201
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;->startRecording()V

    goto :goto_0

    .line 203
    :cond_3
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v0, v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;->stopRecording()V

    goto :goto_0
.end method
